class Example{
    // 同一个文件中可操作private域名
    static void main(String[] args){
        Student st = new Student();
        st.StudentId = 1;

        st.Marks = 10;
        st.setName('lee');
        st.name = "name" // 设置成功

        println(st.getName());

        st.DisplayMarks();
    }
}

abstract class Person{
    private String name;
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return this.name;
    }

    public Person(){}
    abstract void DisplayMarks();
}

class Student extends Person{
    int StudentId;
    int Marks;

    public Student(){
        super();
    }

    void DisplayMarks(){
        println(Marks);
    }
}